Edmonds' algorithm